package com.peycard.persistence.entities;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the VINCULACION database table.
 * 
 */
@Entity
@NamedQueries({
	@NamedQuery(name="findAllVinc_1", query="SELECT v FROM Vinculacion v")
})
public class Vinculacion implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="VINCULACION_IDVINCULACION_GENERATOR", sequenceName="ID_VINCULACION_GENERATOR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="VINCULACION_IDVINCULACION_GENERATOR")
	@Column(name="ID_VINCULACION")
	private long idVinculacion;

	//bi-directional many-to-one association to Token
	@OneToMany(mappedBy="vinculacion")
	private Set<Token> tokens;

	//bi-directional many-to-one association to ReaderList
    @ManyToOne
	@JoinColumn(name="ID_READER_LIST")
	private ReaderList readerList;

	//bi-directional many-to-one association to UserList
    @ManyToOne
	@JoinColumn(name="ID_USER_LIST")
	private UserList userList;
    
    @ManyToOne
	@JoinColumn(name="ID_COMPANY")
    private Company company;
    
    private String noSerie;
    private String user;
    private String companyName;
    
    public Vinculacion() {
    }

	public long getIdVinculacion() {
		return this.idVinculacion;
	}

	public void setIdVinculacion(long idVinculacion) {
		this.idVinculacion = idVinculacion;
	}

	public Set<Token> getTokens() {
		return this.tokens;
	}

	public void setTokens(Set<Token> tokens) {
		this.tokens = tokens;
	}
	
	public ReaderList getReaderList() {
		return this.readerList;
	}

	public void setReaderList(ReaderList readerList) {
		this.readerList = readerList;
	}
	
	public UserList getUserList() {
		return this.userList;
	}

	public void setUserList(UserList userList) {
		this.userList = userList;
	}

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	/**
	 * @return el noSerie
	 */
	public String getNoSerie() {
		return noSerie;
	}

	/**
	 * @param noSerie el noSerie a establecer
	 */
	public void setNoSerie(String noSerie) {
		this.noSerie = noSerie;
	}

	/**
	 * @return el user
	 */
	public String getUser() {
		return user;
	}

	/**
	 * @param user el user a establecer
	 */
	public void setUser(String user) {
		this.user = user;
	}

	/**
	 * @return el companyName
	 */
	public String getCompanyName() {
		return companyName;
	}

	/**
	 * @param companyName el companyName a establecer
	 */
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	
}